<?php
include_once(dirname(__FILE__) . '/../domain/Day.php');
include_once(dirname(__FILE__) . '/../database/dbDay.php');


echo 'testing dbDay functions</br>';
testRetrieveDay();


// tests the retrieve_client() function in dbClients.php
function testRetrieveDay() {
    
   $day =  retrieve_day('04-29-14');
   if ($day == null)
       echo 'no records retrieved'.'</br>';
   else {
       error_log('in testdbDay, retrieved a day');
       echo 'the day is '.$day->get_day().'</br>';
      echo 'the id is ' .$day->get_id().'</br>';
        echo 'the year is ' . $day->get_year().'</br>';
        $shifts = $day->get_shifts();
        echo 'the number of shifts is '. count($shifts).'</br>';
        foreach($shifts as $shift)
            echo $shift->get_id().'</br>';
   }
}



